import { action, observable } from 'mobx';
import categoryService from '../services/category/categoryService';
import { CategoryQueryDto } from '../services/category/dto/categoryQueryDto';
import { CategoryListDto } from '../services/category/dto/categoryListDto';

class CategoryStore {
    @observable categoryList: CategoryListDto[] = []

    @action
    async getCategoriesAsync(input: CategoryQueryDto) {
        await categoryService.getCategoriesAsync(input).then((res) => {
            this.categoryList = res
        })
    }
}

export default CategoryStore;
